home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / rexx / firsterror.quill < prev    next >
Text File  |  1995-08-29  |  987b  |  56 lines

  1.  
  2. /**
  3.  **  $VER: FirstError.quill 1.0 (24.7.94)
  4.  **  By Timothy J. Aston
  5.  **
  6.  **/
  7.  
  8.  
  9. /* Some setup first.
  10.  */
  11. options results
  12. options failat 200
  13.  
  14. NL = d2c(10)
  15.  
  16. main:
  17.     /* Open the errors file.
  18.      */
  19.     if open('errors_fh', 't:Quill_Errors', 'R') then do
  20.         'LOCKGUI'
  21.  
  22.         'GETATTR' 'PROJECT FILE VAR' filename; say filename
  23.  
  24.         /* Read all the errors into a stem.
  25.          */
  26.         ok = TRUE
  27.         do while ~eof('errors_fh') & ok = TRUE
  28.             errorfile = strip(readln('errors_fh'), 'B')
  29.             errorline = strip(readln('errors_fh'), 'B')
  30.             errorcol = strip(readln('errors_fh'), 'B')
  31.             errordesc = strip(readln('errors_fh'), 'B')
  32.             call readln('errors_fh')
  33.             call readln('errors_fh')
  34.  
  35.             if errorfile = filename then do
  36.                 'GOTOLINE' errorline
  37.                 'SETSTATUSBAR' errordesc
  38.                 ok = FALSE
  39.             end
  40.         end
  41.  
  42.         if ok = TRUE then do
  43.             'REQUESTNOTIFY' '"No errors in this file"'
  44.         end
  45.  
  46.         close('errors_fh');
  47.  
  48.         'UNLOCKGUI'
  49.     end
  50.     /* Or if its not there, we have no errors.
  51.      */
  52.     else
  53.         'REQUESTNOTIFY' '"No errors"'
  54.  
  55.     exit
  56.